package cn.liontalk.annotation;

import cn.liontalk.entity.User;

/**
 * @author ZhouZhe
 * @version 1.0
 * @description
 * @date 2019-01-24 20:58
 **/
public class UserContext {

    private static ThreadLocal<User> userHolder = new ThreadLocal<User>();

    public static void setUser(User user) {
        userHolder.set(user);
    }

    public static User getUser() {
        return userHolder.get();
    }
}
